import request from '@/utils/request'
const baseURL='/classroom';
export function getList() {
  return request({
    // url: '/vue-admin-template/user/login.\*',
    method: 'get',
    url: '/classroom/getList',
  })
}
export function add(param) {
  return request({
    // url: '/vue-admin-template/user/login',
    method: 'post',
    url: '/classroom/add',
    data:param,
  })
}
export function deleteClassroom(param){
  return request({
    // url: '/vue-admin-template/user/login',
    method: 'delete',
    url: baseURL+'/delete',
    params:{
      index:param
    }
  })
}
export function update(param){
  return request({
    // url: '/vue-admin-template/user/login',
    method: 'put',
    url: baseURL+'/put',
    data: param

  })
}
//可以和getList写成一起的
export function getListByCondition(param) {
  return request({
    // url: '/vue-admin-template/user/login.\*',
    method: 'get',
    url: '/classroom/getListByCondition',
    // params: param//确定传过来是一个对象。
    params:param
  })
}
